package com.zjh.es.entry;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;


@Data
@Document(indexName = "products",createIndex = true)
public class Productss {
    @Id
    private String id;
    @Field(type = FieldType.Keyword)
    private String title;
    @Field(type = FieldType.Double)
    private String price;
    @Field(type = FieldType.Date)
    private Date createAt;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String description;
}
